package kr.hkit.powerjava.chapter08;

class A {
	/*
	 * public void aa() {
	 * 
	 * System.out.println("aa()");
	 * 
	 * bb(); System.out.println("aa - end"); }
	 * 
	 * public void aa(int a) { System.out.println("aa(int a)"); }
	 * 
	 * public void aa(int a,int b){} public void aa(int a,int b,int c){}
	 */

	public void aa(int... a) {
		System.out.println("인수의 개수 : " + a.length);
		for (int c : a) {
			System.out.println(c);
		}
		System.out.println();
	}  //end of aa
	
	public void bb(String str, int...c){
		System.out.println(str);
		System.out.println("인수의 개수: "+ c.length);
		for (int d: c){
			System.out.print(d + " ");
		}
	}  //end of bb
	/*
	 * public void aa(double b) { System.out.println("aa(double a)"); }
	 */

	/*
	 * public void bb() { System.out.println("bb - start"); cc();
	 * System.out.println("bb - end");
	 * 
	 * }
	 * 
	 * public void cc() { System.out.println("cc - start");
	 * System.out.println("cc - end"); } }
	 */   
}  // end of class A

public class MethodCallTest {
	public static void main(String[] args) {
		A a = new A();
		
		a.bb("aa",1,2,3,4);
		a.bb("aa",1,2,3);
		a.bb("aa",1,2);
		a.bb("aa",1);
		
		System.out.println("====================================");
		
		a.aa();
		a.aa(3);
		a.aa(1, 2);
		a.aa(1, 2, 3);
		a.aa(1, 2, 3, 4);
		

		
		
		
	}

}
